package club.ruanx.search.feign.client;


import club.ruanx.solr.param.SolrMovieParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 阮胜
 * @date 2018/7/22 23:37
 */
@FeignClient(name = "SEARCH-SERVICE")
public interface SolrMovieServiceClient {

    /**
     * 保存电影
     *
     * @param solrMovieParam 电影信息
     * @return
     */
    @PostMapping("/movie/save")
    boolean save(@RequestBody SolrMovieParam solrMovieParam);

    /**
     * 删除电影
     *
     * @param movieId 电影ID
     * @return
     */
    @DeleteMapping("/movie/delete/{movieId}")
    boolean delete(@PathVariable String movieId);
}
